home *** CD-ROM | disk | FTP | other *** search
- class CMenuPickLevel extends CMovieClipFresh
- {
- var _buttonBack;
- var _buttonJump;
- var _skipLevelButtonHost;
- function CMenuPickLevel()
- {
- super();
- this.stop();
- }
- function FirstFrameInitialize()
- {
- this._buttonBack.Initialize("Back",this.OnBack);
- this._buttonJump.Initialize("Play",this.OnJump);
- this._buttonJump.SetEnabled(false);
- var _loc10_ = 350;
- var _loc3_ = _loc10_ / 10;
- var _loc2_ = 1;
- while(_loc2_ <= 10)
- {
- this._skipLevelButtonHost.attachMovie("Skip Level Button","_button" + this._skipLevelButtonHost.getNextHighestDepth(),this._skipLevelButtonHost.getNextHighestDepth(),{_iLevel:_loc2_,_x:_loc3_ * (_loc2_ - 1),_y:0,_xscale:60,_yscale:60});
- _loc2_ = _loc2_ + 1;
- }
- var _loc9_ = 60;
- _loc2_ = 1;
- this._skipLevelButtonHost.attachMovie("Skip Level Button","_button" + this._skipLevelButtonHost.getNextHighestDepth(),this._skipLevelButtonHost.getNextHighestDepth(),{_iLevel:15,_x:_loc3_ * (_loc2_ - 1),_y:_loc9_,_xscale:60,_yscale:60});
- _loc2_ = 2;
- while(_loc2_ <= 10)
- {
- this._skipLevelButtonHost.attachMovie("Skip Level Button","_button" + this._skipLevelButtonHost.getNextHighestDepth(),this._skipLevelButtonHost.getNextHighestDepth(),{_iLevel:_loc2_ * 10,_x:_loc3_ * (_loc2_ - 1),_y:_loc9_,_xscale:60,_yscale:60});
- _loc2_ = _loc2_ + 1;
- }
- }
- function onEnterFrame()
- {
- super.onEnterFrame();
- this._buttonJump.SetEnabled(int(_root._strJumpLevel) >= 1);
- }
- function OnBack()
- {
- _root._mainMenu.gotoAndPlay("from pick level");
- }
- function OnJump()
- {
- _root._iStartLevel = int(_root._strJumpLevel) - 1;
- _root._mainMenu.gotoAndPlay("dismiss pick");
- }
- }
-